package com.example.mvc;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;

import javax.servlet.Filter;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpSessionListener;

@ServletComponentScan(basePackages = {"com.example.mvc.servlet"})
@SpringBootApplication
public class MvcApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext context =
                SpringApplication.run(MvcApplication.class, args);

        context.getBeansOfType(HttpServlet.class).keySet().forEach(System.err::println);
        context.getBeansOfType(Filter.class).keySet().forEach(System.err::println);
        context.getBeansOfType(HttpSessionListener.class).keySet().forEach(System.err::println);

        // context.close();
    }
}
